package com.sgb.kjwl.model.entity;

import com.google.gson.annotations.SerializedName;

public class SearchMachineOutEntity {
    @SerializedName("id")
    private String id;
    @SerializedName("title")
    private String title;
    @SerializedName("areaName")
    private String areaName;
    @SerializedName("price")
    private String price;
    @SerializedName("brandName")
    private String brandName;
    @SerializedName("refreshTime")
    private String time;
    @SerializedName("priceUnitName")
    private String unit;
    @SerializedName("pictures")
    private String imgUrl;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getImgUrl() {
        if (imgUrl != null)  {
            String img[] = imgUrl.split(",");
            if (img != null || img.length > 0) {
                return img[0];
            }
        }
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }
}
